import React from "react";
import { Switch, Route, Redirect } from "react-router-dom";
import Home from "./pages/home/Index";
import Detail from "./pages/detail/Index";
import City from "./pages/city/Index";
import NotFound from "./pages/404/Index";

const App = () => {
  return (
    <div>
      <Switch>
        <Redirect from="/" to="/home" exact></Redirect>
        <Route path="/home">
          <Home />
        </Route>
        <Route path="/detail">
          <Detail />
        </Route>
        <Route path="/city">
          <City />
        </Route>
        <Route path="*">
          <NotFound />
        </Route>
      </Switch>
    </div>
  );
};

export default App;
